#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import groupgrade_blueprint
from api_1_0.groupGradeResource.groupGradeResource import GroupGradeResource
from api_1_0.groupGradeResource.groupGradeOtherResource import GroupGradeOtherResource, GroupGradeAddResource

api = Api(groupgrade_blueprint)

api.add_resource(GroupGradeResource, '/groupGrade/<evaluated_id>', '/groupGrade', endpoint='GroupGrade')


@groupgrade_blueprint.route('/groupGrade/update/<evaluated_id>', methods=['PUT'], endpoint='GroupGradeUpdate')
def update(evaluated_id):
    return GroupGradeOtherResource.sensitive_update(evaluated_id)


# 添加学生分组成绩
api.add_resource(GroupGradeAddResource, '/groupGrade/add', endpoint='add_groupGrade')
